﻿using EcoSystem.Enums;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace EcoSystem
{
    /// <summary>
    /// 添加或更新的DTO
    /// </summary>
    public class CreateOrUpdateConfigDefineDto
    {
        /// <summary>
        /// 分类
        /// </summary>
        [Required(ErrorMessage = "分类不能为空")]
        public string Category { get; set; }

        /// <summary>
        /// 配置键
        /// </summary>
        [Required(ErrorMessage = "配置键不能为空")]
        public string Key { get; set; }

        /// <summary>
        /// 键名称
        /// </summary>
        [Required(ErrorMessage = "配置键名称不能为空")]
        public string KeyName { get; set; }

        /// <summary>
        /// key 类型 数字，字符串，时间等
        /// </summary>
        public string KeyType { get; set; }

        /// <summary>
        /// 默认值
        /// </summary>
        public string DefaultValue { get; set; }

        /// <summary>
        /// 组件类型
        /// </summary>
        public string ControlType { get; set; }

        /// <summary>
        /// 组件属性
        /// </summary>
        public string ControlProperty { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int SortIndex { get; set; }
    }
}
